import request from "./../utils/request";

//加入购物车
export function addCart (parmas) {
  return request.post(/cart/add, parmas)
}

//获取购物车数据(以用户为单位)
export function getCartList (params) {
  return request.post('/cart/list', parmas)
}

//更新购物车数量
export function updateNum (params) {
  return request.post('/cart/updatenum', params)
}

//更新购物车单条数据选中状态
export function selectone (params) {
  return request.post('/cart/selectone', params)
}

//删除购物车单条数据
export function  remove (params) {
  return request.post('/cart/remove', params)
}

// 删除当前用户的所有的数据
export function removeall (params) {
  return request.post('/cart/removeall', params)
}